package main

// #cgo CFLAGS: -I.
// #include <stddef.h>
// void intercept(char *symbol, size_t symbol_len);
import "C"
import (
	"time"
	"unsafe"
)

func Intercept(symbol string) {
	ptr := unsafe.Pointer(&([]byte(symbol)[0]))
	C.intercept((*C.char)(ptr), C.size_t(len(symbol)))
}

func main() {
	Intercept("gethostbyname\x00")
}

func main() {
	go C.intercept()
	time.Sleep(5 * time.Second)
}